<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="commontaglib"%>
<%
String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <link rel="stylesheet" href="<%=path%>/css/innerstyle.css" type="text/css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<%=path%>/css/custom-theme/jquery-ui.custom.min.css" />
	<script type='text/javascript' src='/glqt/dwr/util.js'></script>
	<script type='text/javascript' src='/glqt/dwr/engine.js'></script>    
    <script type='text/javascript' src='/glqt/dwr/interface/htdwr.js'></script>
    <script type='text/javascript' src='/glqt/dwr/interface/jydz.js'></script>
	<script type="text/javascript" src="<%=path%>/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/jquery-ui.custom.min.js"></script> 
	<script type="text/javascript" src="<%=path%>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>
	<script type="text/javascript" src="<%=path%>/js/jquery.form.js"></script>
	<script type="text/javascript" src="<%=path%>/js/json2.js"></script>
	<script type="text/javascript" src="<%=path%>/js/jquery.validate.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/messages_zh.js"></script>
	
	<style type="text/css">

#tab{
	width:99%;	
	border:#F4F4F4 solid 4px;
	padding:0 2px 3px 2px;
	margin:0;
	float:left;
}
#tab h1{
	display:block;
	width:95%;
	height:45px;	
	float:center;
	text-align: center;
	padding-top:5px;
}
#tab h1 span{
	width:250px;
	font:bold 26px/55px Arial, Helvetica, sans-serif;
	color:#fff;
	background-color:#fff;
	display:block;
}

.textbox
{
	width:90px;
	border:#000 1px solid;
}
.textboxs
{
	width:70px;
	border:#000 1px solid;
}
.textboxs1
{
	width:70px;
	border:#000 1px solid;
	background-color:#ddd;
}
.longtextbox
{
	width:180px;
	border:#000 1px solid;
}
.longtextbox1
{
	width:180px;
	border:#000 1px solid;
	background-color:#ddd;
}
.shorttextbox
{
	width:50px;
	border:#000 1px solid;
}
.shorttextbox1
{
	width:50px;
	border:#000 1px solid;
	background-color:#ddd;
}
.textarea
{
    overflow:auto;	
	border:#000 1px solid;
		
}
.textarea1
{
    overflow:auto;	
	border:#000 1px solid;
	background-color:#ddd;	
}
.select div {
  border:1px solid #000;
  float: left;
}
label{ display:block; }
fieldset { padding:0; border:0; margin-top:25px; }
label.error {  
        color: red;/*错误信息的颜色*/  
    }  
input.error {  
        border:1px dotted red;/*输入错误的输入框的边框样式*/  
    }		
	
	</style>
<script type='text/javascript'>  
    function loadTabForHtxs(){       
    var url = "";
    var projects = "";
    var vvalue=${bdxx.hetxs};
    //alert(vvalue);
    if(vvalue =='1'){
      changeTabForShsxx("100000","sheng");       
    }else{
      changeTabForShsxx("140000","sheng");        
    }    
    loadForYinyzOrChusz(vvalue);
    }
    
    function loadForYinyzOrChusz(vvalue){
    var url = "";
    var projects = "";
    if(vvalue =='1'){
    url = "<%=path%>/jydz/findReChusz.action";
    }else{
    url = "<%=path%>/jydz/findReYingyz.action";
    }
    $.post(url,function(data){ 
        projects = eval('(' + data + ')');
        $("#yingyz").empty(); 
        $("#yingyz").append("<option value='-1'>请选择</option>");      
        for(var i=0;i<projects.length;i++){
        //alert(projects[i].name);
        $("#yingyz").append("<option value='"+projects[i].id+"'>"+projects[i].name+"</option>");
        }
        });
    }
    
   function changeTabForMsr(val){ 
      var url = "";     
      var dwbm = ${jydw.qiydm};     
      if(dwbm==val){
      url = "<%=path%>/htgl/findJydwList.action?dwbm="+val;
      $.post(url,function(data){
            var json = eval('(' + data + ')');
            $("#maisr").val(json[0].qiyqc);
            $("#zs").val(json[0].tongxdz);
            $("#fddbr").val(json[0].faddbr);
            $("#wtdlr").val(json[0].lianxr);
            $("#dh").val(json[0].lianxrdh);
            $("#cz").val(json[0].qiycz);
            $("#yb").val(json[0].qiyyb);
            $("#khyh").val(json[0].jiesfzh);
            $("#zh").val(json[0].jiesyhzh);
            $("#djh").val(json[0].shuiwdjzhgs);
            $("#msrlx").val('3');
            });      
      }else{
      url = "<%=path%>/htgl/findZgdwList.action?dwbm="+val;
      $.post(url,function(data){
            var json = eval('(' + data + ')');
            $("#maisr").val(json[0].danwmc);
            $("#zs").val(json[0].zhus);
            $("#fddbr").val(json[0].faddbr);
            $("#wtdlr").val(json[0].weitdlr);
            $("#dh").val(json[0].dianh);
            $("#cz").val(json[0].chuanz);
            $("#yb").val(json[0].youzbm);
            $("#khyh").val(json[0].kaihyh);
            $("#zh").val(json[0].yinhzh);
            $("#djh").val(json[0].nasrdjh);
            $("#msrlx").val('4');
            });
      }
      
    }
    
    function changeTabForJsdw(vvalue,dwlx){
        //alert(vvalue);
        htdwr.findJsdwDwr(vvalue,function(data) {
        if(dwlx=='1'){
              $("#szs").val(data.jiesdwzs);
              $("#sfddbr").val(data.faddbr);
              $("#swtdlr").val(data.weitdlr);
              $("#sdh").val(data.dianh);
              $("#scz").val(data.chuanz);
              $("#syb").val(data.youzbm);
              $("#skhyh").val(data.kaihyh);
              $("#szh").val(data.yinhzh);
              $("#sdjh").val(data.nasrdjh);
              $("#cmdwjsrmc").val( $("#chumdwjsrbm").find("option:selected").text()); 
           }else{
              $("#bzs").val(data.jiesdwzs);
              $("#bfddbr").val(data.faddbr);
              $("#bwtdlr").val(data.weitdlr);
              $("#bdh").val(data.dianh);
              $("#bcz").val(data.chuanz);
              $("#byb").val(data.youzbm);
              $("#bkhyh").val(data.kaihyh);
              $("#bzh").val(data.yinhzh);
              $("#bdjh").val(data.nasrdjh);
              $("#msdwjsrmc").val( $("#maisdwjsrbm").find("option:selected").text()); 
           }
        
        });       
    }
    
    function changeTabForShsxx(vvalue,tabid){  
        htdwr.findShengSDwr(vvalue,function(data) {
        //alert("#"+tabid);
        $("#"+tabid).empty(); 
        $("#"+tabid).append("<option value='-1'>请选择</option>");       
        for(var i=0;i<data.length;i++){
        sObj = data[i];
        $("#"+tabid).append("<option value='"+sObj.regioncode+"'>"+sObj.regionname+"</option>");
        }
               
        });        
    }
    
    function loadMsrData(){
        var url = "<%=path%>/htgl/findSjdwList.action";       
        $.post(url,function(data){
            var json = eval('(' + data + ')');           
        $("#msrbm").empty();        
        $("#msrbm").append("<option value='${jydw.qiydm}'>${jydw.qiyqc}</option>");      
        for(var i=0;i<json.length;i++){
        //alert(projects[i].name);
        $("#msrbm").append("<option value='"+json[i].danwbm+"'>"+json[i].danwmc+"</option>");
        }
        });
    }
   
    function loadMsrJsdwData(){
            var dwbm = ${jydw.qiydm};
             var url = "<%=path%>/htgl/findMsrJsList.action?msrId="+dwbm;
               $.post(url,function(data){
                var json = eval('(' + data + ')');
                $("#maisdwjsrbm").empty(); 
                $("#maisdwjsrbm").append("<option value='-1'>请选择</option>");      
                  for(var i=0;i<json.length;i++){                
                  $("#maisdwjsrbm").append("<option value='"+json[i].jiesdwbm+"'>"+json[i].jiesdwmc+"</option>");
                  }
               });
    } 
    
    function loadShdwData(){
    var dwbm = '${jydw.qiydm}';
    var url = "<%=path%>/htgl/findShdwList.action?msrId="+dwbm;    
      $.post(url,function(data){ 
        var projects = eval('(' + data + ')'); 
        //alert(projects);
       $( "#shr").autocomplete({
			minLength:2,
			source:projects,			
            select: function( event, ui ) {
            //alert(ui.item.label);	
				$( "#shr" ).val( ui.item.label );							
				$( "#shrid").val( ui.item.shouhdwbm );						
				return false;

			}
		});
    });
    }
       
    function loadFhdwData(){
       var url = "<%=path%>/htgl/findFhdwList.action";    
      $.post(url,function(data){ 
        var projects = eval('(' + data + ')'); 
        //alert(projects);
       $( "#fahdwmc").autocomplete({
			minLength:2,
			source:projects,			
            select: function( event, ui ) {
            //alert(ui.item.label);	
				$( "#fahdwmc").val( ui.item.label );							
				$( "#fahdwbm").val( ui.item.fahdwbm );						
				return false;

			}
		});
    });
    }
   
    $(function(){ 
    // $("#jan").blur(function(){   txtyuesl_onblur();  });
        loadMsrData();   
        loadTabForHtxs();     
        loadMsrJsdwData();
        loadShdwData();              
        $("#but1").button();
        $("#but2").button();
        $("#but3").button();
        $("#jsdnr").button();
        $("#jsdnr1").button();
        $("#jsdnr1").hide();      
	    checkJg();
		tj();   
		jsdxxHide();  
		$("#jsdnr1").click(function(){
		jsdxxHide();		
		});
		$("#jsdnr").click(function(){
		jsdxxShow();		
		}); 
		//$( document ).tooltip();
		$( document ).tooltip({
      position: {
        my: "left top",
        at: "right top",
        using: function( position, feedback ) {
        $( this ).css( position );
          $( "<div>" )
            .addClass( "arrow" )
            .addClass( feedback.vertical )
            .addClass( feedback.horizontal )
            .appendTo( this );
        }
      }

    });
    });
    
    
	
	function tj(){	
	/**  
     * 自定义验证规则——增加对select的验证  
     */  
    $.validator.addMethod(    
        "selectNone", 
        function(value, element)
        {   
            if (value == "-1") 
            {    
                return false;    
            }    
            else    
            {   
                return true;    
            }   
        },    
        "必须选择一项" 
    );   
	
	$("#form1").validate({
	       rules: {
	       sheng:{
	       selectNone:true
	       },	       
	       "yd.yingdsl":{
	       required: true, 
	       digits:true,
	       range:[0,9999999]
	       },
	        "yd.jsdw":{
	       selectNone:true
	       },		   
		   "yd.gml1":{
	       digits:true,
	       range:[0,${bdxx.yl1}]
	       },		   
		   "yd.gml2":{
	       digits:true,
	       range:[0,${bdxx.yl2}]
	       },		   
		   "yd.gml3":{
	       digits:true,
	       range:[0,${bdxx.yl3}]
	       },		   
		   "yd.gml4":{
	       digits:true,
	       range:[0,${bdxx.yl4}]
	       },		   
		   "yd.gml5":{
	       digits:true,
	       range:[0,${bdxx.yl5}]
	       },		   
		   "yd.gml6":{
	       digits:true,
	       range:[0,${bdxx.yl6}]
	       },		   
		   "yd.gml7":{
	       digits:true,
	       range:[0,${bdxx.yl7}]
	       },		   
		   "yd.gml8":{
	       digits:true,
	       range:[0,${bdxx.yl8}]
	       },		   
		   "yd.gml9":{
	       digits:true,
	       range:[0,${bdxx.yl9}]
	       },		   
		   "yd.gml10":{
	       digits:true,
	       range:[0,${bdxx.yl10}]
	       },		   
		   "yd.gml11":{
	       digits:true,
	       range:[0,${bdxx.yl11}]
	       },		   
		   "yd.gml12":{
	       digits:true,
	       range:[0,${bdxx.yl12}]
	       }
	       },
		   messages: {
		   sheng:"请选择省份",
	       "yd.jsdw":"请选择买受人结算单位",
		   "yd.yingdsl":{
	       required: "请输入数量", 
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入一千万吨之内的数")
	       },
		   "yd.gml1":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml2":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml3":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml4":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml5":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml6":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml7":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml8":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml9":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml10":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml11":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml12":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       }
		   }
		   });
		   $("#but1").click(function(){
		    if($("#form1").valid()){ 
		       var flag = true;
		       var msg = "";
		       if(document.getElementById("shrid").value==""){
		           msg ="请选择收货单位";
		           flag = false;
		        }
		         if(parseFloat(document.getElementById("shul").value)>parseFloat(document.getElementById("bdsl").value)){
		          msg ="应单数量大于报单数量,请重新填写";
		          flag = false;
		        }
		        
		        if(parseFloat(document.getElementById("shul").value)!=parseFloat(GetYueZJ())){
		          msg ="应单总数量和分月数量不等,请重新填写";
		          flag = false;
		        }
		        
		        if(flag){
		        var url = "<%=path%>/gpjy/saveYdxxInfo.action";
		         $("#form1").ajaxSubmit({
		              url:url,
		              type:'post',
		              success:function(data){
		              var json =eval('(' + data + ')');
					    if(json.result==1){
					    alert("应单成功！");
					    window.returnValue=1;
                        window.close();					   
					   }else{
					    alert("应单失败！");
					   }
		              }
		         });
		        }else{
		        alert(msg);
		        }
		        		       
		       
		        }
		       });
	     
	}
	
	function txtzjl_onblur() { 
	     if ($("#shul").val() != "") {
                var zjsl = parseFloat($("#shul").val());
                var yuesl = zjsl / 12;
                var intyue = parseInt(yuesl);
                var syysl = intyue * 11;
                var srysl = zjsl - syysl;
                SetYueZJ(intyue, srysl);
                return;
            }
            SetYueZJ(0, 0); 
	     
            
        }

        function SetYueZJ(yuesl, srysl) {
            if(yuesl==0){
            $("#shul").val(yuesl)
            }
            $("#jan").val(yuesl);
            $("#feb").val(yuesl);
            $("#mar").val(yuesl);
            $("#apr").val(yuesl);
            $("#may").val(yuesl);
            $("#jun").val(yuesl);
            $("#jul").val(yuesl);
            $("#aug").val(yuesl);
            $("#sep").val(yuesl);
            $("#oct").val(yuesl);
            $("#nov").val(yuesl);
            $("#dec").val(srysl);            
        }  
        
     function txtyuesl_onblur() {
            if (!event.srcElement.value) {
                event.srcElement.value = '0'
            }
            var temp = GetYueZJ();
            if (isNaN(temp)) {
                $("#shul").val(0);                
            }
            else {
                $("#shul").val(temp);                
            }

        }

        function GetYueZJ() { 
              var yue1 =parseFloat($("#jan").val()==''?0:$("#jan").val());            
            var yue2 = parseFloat($("#feb").val()==''?0:$("#feb").val());
            var yue3 = parseFloat($("#mar").val()==''?0:$("#mar").val());
            var yue4 = parseFloat($("#apr").val()==''?0:$("#apr").val());
            var yue5 = parseFloat($("#may").val()==''?0:$("#may").val());
            var yue6 = parseFloat($("#jun").val()==''?0:$("#jun").val());
            var yue7 = parseFloat($("#jul").val()==''?0:$("#jul").val());
            var yue8 = parseFloat($("#aug").val()==''?0:$("#aug").val());
            var yue9 = parseFloat($("#sep").val()==''?0:$("#sep").val());
            var yue10 = parseFloat($("#oct").val()==''?0:$("#oct").val());
            var yue11 = parseFloat($("#nov").val()==''?0:$("#nov").val());
            var yue12 = parseFloat($("#dec").val()==''?0:$("#dec").val()); 

            var yuezj = yue1 + yue2 + yue3 + yue4 + yue5 + yue6 + yue7 + yue8 + yue9 + yue10 + yue11 + yue12;
            return yuezj;
        }
     
     function jsdxxHide(){
     $("#jsdnr1").hide();
     $("#jsdnr").show();
        $.each($("#bjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#bjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#sjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#sjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        });   
     }  
     
     function jsdxxShow(){
     $("#jsdnr").hide();
     $("#jsdnr1").show();
     $.each($("#bjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       });
     $.each($("#sjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       }); 
       $.each($("#bjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       });
     $.each($("#sjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       });
     } 
	
	function checkJg(){
	var jig = "${bdxx.danj}";
	//alert(jig);
	var jiglx ="${bdxx.jiaglxname}";
	var neir =$("#neir2").text();
	var str = "";
	if(jiglx!='' && jiglx!=null){
	    str+=jiglx+":";
	}
	if(jig!='' && jig!=null){
	    str+=jig+"元/吨,"	;
	}
	$("#neir2").text(str+neir);
	}
	</script>

  </head>
  
  <body>

<div id="tab">
<h1>挂 牌 应 单</h1>

<form name="form1" id="form1">
<table id="list_search" cellpadding="0" cellspacing="0" border="0">        
        <tr>
        	<td> 
            	出卖人（销方）: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.baodrdwmc}" readonly/> 
            	<input type="hidden" name="bd.baoddw" value="${jydw.qiydm}">
            </td>
            <td>
            	发货单位:
            </td>
            <td>
                <input id="fahdwmc" name="fahdwmc" type="text" class="longtextbox1" value="${bdxx.sfahdwname}" />            	
            </td>
            <td> <s:if test="bdxx.hetxs==1">
                  <span id="mgz">出省站:</span>
                </s:if> 
                <s:else>
                  <span id="mgz">营业站:</span>
                </s:else>
                  
            </td>
            <td>
            <div class="select"><div>
            	    <select id="yingyz" name="yd.yingyzmeijglz" style="width:180px;"></select>            	
            </div></div>            	       
            </td> 
        </tr>
        
		<tr>
        	<td>
            	买受人（购方）:
            </td>
            <td>
            <div class="select"><div>
            	<select id="msrbm" name="yd.yingddw" style="width:180px;" onChange="changeTabForMsr(this.value)" >
            	
            	</select>            	
            </div></div>
            </td>
            <td>煤源地:</td>
            <td><input type="text" class="longtextbox1" value="${bdxx.meiyd}" readonly/></td>
            <td>
                                          到达省、地（市）:<span style="color: red;font-size:16px;vertical-align:middle;">*</span>
            </td>
            <td> 
                <div class="select"><div title="请先选择合同形式"><select id="sheng" name="sheng" style="width:90px;" onChange="changeTabForShsxx(this.value,'shi')" ></select></div></div>
                <div class="select"><div><select id="shi" name="yd.daodssd" style="width:90px;" ></select></div></div>                  
            </td>            
        </tr>
        
        <tr>
        	<td>
            	合同形式:
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.hetxsname}" readonly/>            	               
            </td>
            <td>
            	价格类型:
            </td>
            <td>
            	<input id="" type="text" class="longtextbox1" value="${bdxx.jiaglxname}" readonly/>
            	               
            </td>
            <td>
                                        隶属行业:                      
            </td>
            <td>            	 
            	<input type="text" class="longtextbox1" value="${bdxx.lisname}" readonly/>            	          	
            </td>            
        </tr>
       
        <tr><td colspan="6" style="padding-top:5px;">一、收货人名称、品种规格、交（提）货时间、数量 </td></tr>
       <tr>
        	<td colspan="6" style="padding:1px;">
            <table id="changdi" align="center" cellpadding="0" cellspacing="0" class="content_gridview" border="1">
            <thead>
            <tr>
              <th rowspan="3">收货人名称<span style="color: red;font-size:16px;vertical-align:middle;">*</span></th>
              <th rowspan="3">品种规格</th>
              <th rowspan="3">质量指标</th>
              <th rowspan="3">价格<br>(元/吨)</th>
              <th colspan="13">交（提）货时间、煤量（吨）<span style="color: red;font-size:16px;vertical-align:middle;">*</span></th>              
            </tr>
            <tr>
              <th rowspan="2">全年合计<span style="color: red;font-size:16px;vertical-align:middle;">*</span><br><a href="#" onClick="txtzjl_onblur();" style="text-decoration:none;cursor: hand"><img src="<%=path%>/images/pinf.gif" border=0 alt="平分" align= "absmiddle" height="18"  width="18"></a>&nbsp;&nbsp;<a href="#" onClick="SetYueZJ(0,0);" style="border:0px;text-decoration:none;cursor: hand"><img src="<%=path%>/images/qinl.gif"  border=0 alt="清零" align="absmiddle" height="18"  width="18"></a></th>
              <th colspan="3">一季度</th>
              <th colspan="3">二季度</th>
              <th colspan="3">三季度</th>
              <th colspan="3">四季度</th>
            </tr>
            <tr>
              <th>1</th>
              <th>2</th>
              <th>3</th>
              <th>4</th>
              <th>5</th>
              <th>6</th>
              <th>7</th>
              <th>8</th>
              <th>9</th>
              <th>10</th>
              <th>11</th>
              <th>12</th>
            </tr>
          </thead>
            <tbody>
                <tr>
                    <td rowspan="2">
                    <textarea id="shr" cols="15" rows="3" class="textarea" ></textarea>                    
                    <input id="shrid" type="hidden" name="yd.sfahdw" />
                    </td>
                    <td rowspan="2">
                    <textarea cols="12" rows="3" class="textarea1" readonly >${bdxx.pinzgg}</textarea>
                    
                    </td>
                    <td rowspan="2">
                    <textarea cols="30" rows="3" class="textarea1" readonly>${bdxx.zhilzb}</textarea>
                    </td>
                    <td rowspan="2"><textarea cols="10" rows="3" class="textarea1" readonly >${bdxx.danj}</textarea></td>
                    <td><input id="bdsl" type="text" class="textboxs1" value="${bdxx.shengysl}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl1}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl2}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl3}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl4}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl5}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl6}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl7}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl8}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl9}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl10}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl11}" readonly></td>
                    <td><input type="text" class="shorttextbox1" value="${bdxx.yl12}" readonly></td>                    
                </tr> 
                <tr>
                <td><input id="shul" type="text" class="textboxs" name="yd.yingdsl" title="请输入一千万吨之内的数"></td>
                    <td><input id="jan" type="text" class="shorttextbox" name="yd.gml1" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="feb" type="text" class="shorttextbox" name="yd.gml2" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="mar" type="text" class="shorttextbox" name="yd.gml3" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="apr" type="text" class="shorttextbox" name="yd.gml4" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="may" type="text" class="shorttextbox" name="yd.gml5" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="jun" type="text" class="shorttextbox" name="yd.gml6" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="jul" type="text" class="shorttextbox" name="yd.gml7" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="aug" type="text" class="shorttextbox" name="yd.gml8" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="sep" type="text" class="shorttextbox" name="yd.gml9" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="oct" type="text" class="shorttextbox" name="yd.gml10" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="nov" type="text" class="shorttextbox" name="yd.gml11" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>
                    <td><input id="dec" type="text" class="shorttextbox" name="yd.gml12" onkeypress="if( event.keyCode == 13 ) {txtyuesl_onblur();}" onKeyUp="this.value=this.value.replace(/\D/g,'');"></td>                    
                
                </tr>
            </tbody>
            </table>
            </td>
        </tr>
        
        <tr style="line-height:26px;">
					<td colspan="6">
						<table id="djtk" cellpadding="0" cellspacing="0"  border rules=rows frame=below class="content" >

							<s:iterator value="djtk" status="i">
								<tr>
									<td>${tkh} ${biaot}</td>
									<td style="width:86%"><div id="neir${i.index}">${neir}</div></td>
								</tr>
							</s:iterator>
						</table></td>
	    </tr>
        <tr>
        <td colspan="6">
        <table  cellpadding="0" cellspacing="0" style="width:100%" class="content_gridview" border="1">
        <thead>        
            <tr>                
                <th colspan="2">出卖人(销方)</th>
                <th colspan="2">买受人（购方）</th>                
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
<table id="sjsdnr" cellpadding="0" cellspacing="0" border="0" class="content1" >
       <tr>
        	<td> 
            	出卖人名称：
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.baodrdwmc}" readonly/> 
            </td>           
        </tr>
       
        <tr>
        	<td> 
            	住 所: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.zhus}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	法定代表人: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.faddbr}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	委托代理人: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.weitdlr}" readonly/> 
            </td>           
        </tr>
         <tr>
        	<td> 
            	电 话: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.dianh}" readonly/> 
            </td>           
        </tr>
         <tr>
        	<td> 
            	传真: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.chuanz}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	邮政编码: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.youzbm}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	开户银行: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.kaihyh}" readonly/> 
            </td>           
        </tr>        
        <tr>
        	<td> 
            	帐号: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.yinhzh}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	纳税人登记号: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.nasrdjh}" readonly/> 
            </td>           
        </tr>
       
</table>
</td>
                <td><table id="sjsdnr1" cellpadding="0" cellspacing="0" border="0" class="content1" >
       <tr>
        	<td> 
            	出卖人结算单位名称：
            </td>
            <td>
            	   <input  type="text" class="longtextbox1" value="${bdxx.jsdwmc}" readonly/>                
            </td><td valign="top"><br></td>           
        </tr>
        
        <tr>
        	<td> 
            	住 所: 
            </td>
            <td>
            	<input type="text"  class="longtextbox1" value="${bdxx.jsdwzs}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
        <tr>
        	<td> 
            	法定代表人: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jsfddbr}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
        <tr>
        	<td> 
            	委托代理人: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jswtdlr}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
         <tr>
        	<td> 
            	电 话: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jsdh}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
         <tr>
        	<td> 
            	传真: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jscz}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
        <tr>
        	<td> 
            	邮政编码: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jsyb}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
        <tr>
        	<td> 
            	开户银行: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jskhyh}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>        
        <tr>
        	<td> 
            	帐号: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jsyhzh}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
        <tr>
        	<td> 
            	纳税人登记号: 
            </td>
            <td>
            	<input type="text" class="longtextbox1" value="${bdxx.jsnsdjh}" readonly/> 
            </td><td valign="top"><br></td>           
        </tr>
        
</table></td>
                <td><table id="bjsdnr" cellpadding="0" cellspacing="0" border="0" class="content1" >
       <tr>
        	<td>  
            	买受人名称： 
            </td>
            <td>
            	<input  id="maisr" type="text"  class="longtextbox" value="${jydw.qiyjc}" readonly/> 
            </td>           
        </tr>
       
        <tr>
        	<td> 
            	住 所: 
            </td>
            <td>
            	<input id="zs" type="text" class="longtextbox" value="${jydw.tongxdz}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	法定代表人: 
            </td>
            <td>
            	<input id="fddbr" type="text" class="longtextbox" value="${jydw.faddbr}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	委托代理人: 
            </td>
            <td>
            	<input id="wtdlr" type="text" class="longtextbox" value="${jydw.lianxr}" readonly/> 
            </td>           
        </tr>
         <tr>
        	<td> 
            	电 话: 
            </td>
            <td>
            	<input id="dh" type="text" class="longtextbox" value="${jydw.lianxrdh}" readonly/> 
            </td>           
        </tr>
         <tr>
        	<td> 
            	传真: 
            </td>
            <td>
            	<input id="cz" type="text" class="longtextbox" value="${jydw.qiycz}"  readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	邮政编码: 
            </td>
            <td>
            	<input id="yb" type="text" class="longtextbox" value="${jydw.qiyyb}" readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	开户银行: 
            </td>
            <td>
            	<input id="khyh" type="text" class="longtextbox" value="${jydw.kaihyhjbhname}"  readonly/> 
            </td>           
        </tr>        
        <tr>
        	<td> 
            	帐号: 
            </td>
            <td>
            	<input id="zh" type="text" class="longtextbox" value="${jydw.yinghzhjbh}"  readonly/> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	纳税人登记号: 
            </td>
            <td>
            	<input id="djh" type="text" class="longtextbox" value="${jydw.shuiwdjzhgs}" readonly/> 
            </td>           
        </tr>
       <input type="hidden" id="msrlx" name="yd.yinddwlx" value="3">
</table></td>
                <td><table id="bjsdnr1" cellpadding="0" cellspacing="0" border="0" class="content1" >
       <tr>
        	<td>  
            	买受人结算单位名称：<span style="color: red;font-size:16px;vertical-align:middle;">*</span>
            </td>
            <td> 
            <div class="select"><div>
            	<select style="width:180px;" id="maisdwjsrbm" name="yd.jsdw" style="width:180px;" onchange="changeTabForJsdw(this.value,'2')" ></select>            	
            	</div></div>
            </td>           
        </tr>
        
        <tr>
        	<td> 
            	住 所: 
            </td>
            <td>
            	<input id="bzs" type="text" class="longtextbox" /> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	法定代表人: 
            </td>
            <td>
            	<input id="bfddbr" type="text" class="longtextbox" /> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	委托代理人: 
            </td>
            <td>
            	<input id="bwtdlr" type="text" class="longtextbox" /> 
            </td>           
        </tr>
         <tr>
        	<td> 
            	电 话: 
            </td>
            <td>
            	<input id="bdh" type="text" class="longtextbox" /> 
            </td>           
        </tr>
         <tr>
        	<td> 
            	传真: 
            </td>
            <td>
            	<input id="bcz" type="text" class="longtextbox" /> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	邮政编码: 
            </td>
            <td>
            	<input id="byb" type="text" class="longtextbox" /> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	开户银行: 
            </td>
            <td>
            	<input id="bkhyh" type="text" class="longtextbox" /> 
            </td>           
        </tr>        
        <tr>
        	<td> 
            	帐号: 
            </td>
            <td>
            	<input id="bzh" type="text" class="longtextbox" /> 
            </td>           
        </tr>
        <tr>
        	<td> 
            	纳税人登记号: 
            </td>
            <td>
            	<input id="bdjh" type="text" class="longtextbox" /> 
            </td>           
        </tr>
       
</table></td>				
            </tr>
        </tbody>
    </table>
        
        
        </td>
        
        </tr>
        <tr>
        <td colspan="4"><font size="2" color="#FF0000"><br></font></td>
        <td colspan="2" align="right"><font size="2">有效期：<input id="kssj" type="text" class="textbox" value="${bdxx.kaissj}" readonly/> 至<input id="jssj" type="text" class="textbox"  value="${bdxx.jiessj}" readonly/></font></td>
        
        </tr>        
        <tr>
		    <td colspan="6" align="center">	
		    <input type="button" id="jsdnr1" value="隐藏">
		    <input type="button" id="jsdnr" value="展开">&nbsp;&nbsp;&nbsp;    
		    <input id="but1" type="button" name="" value="确认" />		    
		    &nbsp;&nbsp;&nbsp;<input id="but3" type="button" name="" value="关闭" onClick="window.returnValue=1;window.close();"/></td>            
        </tr>
  </table>
  <input type="hidden" name="yd.baodbh" value="${bdxx.baodbh}">   
</form>
</div> 

<div id="dialog-confirm" title="是否确认提交？"></div>

  </body>
</html>

